﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Routing;
using System.Reflection;
using SimpleRest.Core.Routing;

namespace SimpleRest.Core.Routing.Handlers
{
    /// <summary>
    /// An http handler specifically used when an incoming URI could not be routed to a registered service.
    /// </summary>
    public class UriNotFoundHttpHandler : IHttpHandler
    {
        private readonly string Uri;
        public UriNotFoundHttpHandler(string uri)
        {
            this.Uri = uri;
        }

        public bool IsReusable
        {
            get { return true; }
        }

        public void ProcessRequest(HttpContext context)
        {
            context.Response.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
        }
    }
}
